package com.clever.mall.mapper;

import com.clever.mall.commons.dto.SearchRequestParam;
import com.clever.mall.entity.Search;
import com.clever.mall.vo.SearchVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SearchMapper {
    //查找所有用户的搜索数高的前8条
    public List<Search> selectAll();
    //超找用户的搜索关键字前8条
    public List<Search> selectByUserId(@Param("userId") int userId);
    //删除用户的搜索记录
    public int updateByUserId(@Param("uId") int userId);
    //增加搜索关键字
    public int addWords(@Param("requestParam") SearchRequestParam requestParam);
    //判断关键字是否已存在
    public Search selectByWord(@Param("word") String word);
    //更改已存在的关键字的查询数字
    public int updateSearchCount(@Param("search")Search search);
}
